/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.sf.odinms.client;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import net.sf.odinms.database.DatabaseConnection;
/**
 *
 * @author Small丶Hyun
 */
public class 副职业Factory {

    private static Map<Integer, 副职业基本所需> items = new HashMap<Integer, 副职业基本所需> ();

    
    public static 副职业基本所需 getSkillInfoByskillid(int skillid) throws SQLException{
        副职业基本所需 ret = new 副职业基本所需();
        Connection con = DatabaseConnection.getConnection();
        PreparedStatement ps = con.prepareStatement("SELECT * FROM 副职业基本所需 WHERE id = ?");
        ResultSet rs = ps.executeQuery();
        if (!rs.next()) {
            throw new RuntimeException("");
        }
        ret.id = rs.getInt("id");
        ret.技能代码 = rs.getInt("技能代码");
        ret.所需技能等级 = rs.getInt("所需技能等级");
        ret.获得技能熟练度 = rs.getInt("获得技能熟练度");
        ret.获得疲劳值 = rs.getInt("获得疲劳值");
        ret.时限_分钟 = rs.getInt("时限_分钟");
        ret.所需地图标志 = rs.getString("所需地图标志");
        ret.是否为空开物品 = rs.getInt("是否为空开物品");
        return ret;
   }

    public static class 副职业基本所需{
        public int id;
        public int 技能代码;
        public int 所需技能等级;
        public int 获得技能熟练度;
        public int 获得疲劳值;
        public int 时限_分钟;
        public String 所需地图标志;
        public int 是否为空开物品;
    }

    public static class 副职业具体所需{
        public int id;
        public int 技能代码;
        public int 所需技能等级;
        public int 所需物品;
        public int 所需数量;
    }

    public static class 副职业所得{
        
    }

    public static class 副职业配方{
        
    }


}
